﻿namespace MdcService.Configuration
{
    public class Configuration
    {
        [Save("System",nameof(RestService),1)]
        public bool RestService { get; set; } = false;

        [Save("DataBase", nameof(RealtimeDbAppPath), 1)]
        public string RealtimeDbAppPath { get; set; } = "127.0.0.1:6379";

        [Save("DataBase", nameof(RealtimeDbConnectionString), 9)]
        public string RealtimeDbConnectionString { get; set; } = @".\\Redis\\redis-server.exe";

        [Save("DataBase", nameof(HistoryDbConnectionString), 10)]
        public string HistoryDbConnectionString { get; set; } = "server=localhost;user id=root;password=password;database=MDCSerivce";

        [Save("Connection", nameof(ConnectionInterval), 1)]
        public int ConnectionInterval { get; set; } = 300;

        [Save("Connection", nameof(FetchValueInterval), 2)]
        public int FetchValueInterval { get; set; } = 500;

        [Save("Connection", nameof(ConnectionMaxThreads), 3)]
        public int ConnectionMaxThreads { get; set; } = 3;

        [Save("Connection", nameof(FetchValueMaxThreads), 4)]
        public int FetchValueMaxThreads { get; set; } = 3;

        [Save("Connection", nameof(ConnectionRetryParamK), 5)]
        public int ConnectionRetryParamK { get; set; } = 1;

        [Save("Connection", nameof(ConnectionRetryParamN), 6)]
        public int ConnectionRetryParamN { get; set; } = 1;

        [Save("Collection", nameof(HistoryCollectionInterval), 1)]
        public int HistoryCollectionInterval { get; set; } = 1000;

        [Save("Machines", nameof(MachineDefinitionPath), 1)]
        public string MachineDefinitionPath { get; set; } = @".\\Machines";

        [Save("Machines", nameof(MachineDefinitionExt), 2)]
        public string MachineDefinitionExt { get; set; } = @"txt";

        [Save("Test", nameof(ItemForTest), 200)]
        public string ItemForTest { get; set; }

    }
}
